(defun print-dot (number)
  (if (> number 0)
      (progn
	(format t ".")
	(print-dot (- number 1)))
      nil))

(defun print-d (number)
  (do ((x number (- x 1)))
      ((= x 0) 'done)
    (format t ".")))

(defun times-of-a (lst)
  (if (null lst)
      0
      (if (eql 'a (car lst))
	  (+ 1 (times-of-a (cdr lst)))
	  (times-of-a (cdr lst)))))

(defun times-a (lst)
  (let ((times 0))
    (dolist (obj lst)
      (if (eql 'a obj)
	  (setf times (+ 1 times))
	  nil))
    times))

;this is chapter 3, exercise 2
(defun new-union (lst1 lst)
  (let ((x (copy-list lst1)))
    (if (null lst)
	x
	(progn
	  (if (member (car lst) x)
	      nil
	      (setf x (append x (list (car lst)))))
	  (new-union x (cdr lst))))))
	  
    
      
  
	  
    
